recode sex (2=0), copy gen(male)

gen mate=1 if !missing(matingf)
replace mate=1 if !missing(matingm)
replace mate=0 if !missing(ctrl)

gen opp_att=1 if !missing(o_fa) | !missing(o_ma)
replace opp_att=0 if !missing(o_fu) | !missing(o_mu)

alpha pana_mch_1 pana_mch_2 pana_mch_3 pana_mch_4 pana_mch_5, gen(pa)
alpha pana_mch_6 pana_mch_7, gen(mcheck)
alpha pana_mch_8 pana_mch_9 pana_mch_10 pana_mch_11 pana_mch_12, gen(na)

alpha envy_1 envy_2 envy_3 envy_4 envy_5 envy_6 envy_7 envy_8 envy_9, gen(envy)
alpha statusstr_1 statusstr_2 statusstr_3 statusstr_4 statusstr_5, gen(status)

* analysis: manipulation check and alternative states
table mate male, contents (m mcheck sd mcheck)
anova mcheck mate##male		// manipulation effective

anova pa mate##male
anova na mate##male			// no effect of mating motivation on pa or na

anova alt_ex_2 mate##male
anova alt_ex_3 mate##male	// mating motivation doesn't affect competitiveness and agresiveness as such (r1, #12)

anova status mate##male		// also doesn't affect status striving
anova envy mate##male		// or envy

* analysis
recode deceive dodge (2=1)(1=0), gen(dec01 dod01)
label variable dec01 "deceive"
label variable dod01 "dodge"

table mate dec01 opp_att, by(male) contents(freq)
logit dec01 i.male##i.mate##i.opp_att
margins, dydx(mate) at(male=(0 1) opp_att=(0 1)) vsquish
margins, dydx(mate) at(male=(0 1) opp_att=(0 1)) vsquish pwcompare(effects)

table mate dod01 opp_att, by(male) contents(freq)
logit dod01 i.male##i.mate##i.opp_att
margins, dydx(mate) at(male=(0 1) opp_att=(0 1)) vsquish
margins, dydx(mate) at(male=(0 1) opp_att=(0 1)) vsquish pwcompare(effects)

* role of partner and sexual orientation
tab sexuality 							// only 4% classify as non-heterosexual
recode marital (5=2), copy gen(partner) // based on the inspection of "other" response content (tab marital_TEXT): all are some form of partnership

logit dec01 i.male##mate##i.opp_att##c.sexuality
logit dec01 i.male##mate##i.opp_att##i.partner

logit dod01 i.male##mate##i.opp_att##c.sexuality
logit dod01 i.male##mate##i.opp_att##i.partner	// no significant interaction with sexuality or partner status
